//
//  DBHelper+Reading.h
//  KidReading
//
//  Created by Telen on 16/4/10.
//  Copyright © 2016年 刘赞黄Telen. All rights reserved.
//

#import "DBHelper.h"

typedef long long LongLong;

//阅读记录
@interface TABLE_READ_RECORD : TABLE_base
@property(nonatomic,assign)NSInteger userId;
@property(nonatomic,assign)NSInteger bookId;
@property(nonatomic,assign)LongLong enterTime;
@property(nonatomic,assign)LongLong outTime;
@end
@interface TABLE_READ_RECORD_DICT : TABLE_base
@property(nonatomic,assign)LongLong createtime;
@property(nonatomic,strong)NSString* remarks;
@property(nonatomic,strong)NSString* key;
@property(nonatomic,strong)NSString* value;
@end
//记录某本书是否读完
@interface TABLE_READ_OVER : TABLE_base
@property(nonatomic,assign)NSInteger userId;
@property(nonatomic,assign)NSInteger bookId;
@property(nonatomic,assign)NSInteger pageIndex;
@end
//talk
@interface TABLE_TALK_SAVE_INFO : TABLE_base
@property(nonatomic,assign)NSInteger userId;
@property(nonatomic,assign)NSInteger bookId;
@property(nonatomic,strong)NSString* talkVideoUrl;
@property(nonatomic,strong)NSString* talkVideoShareUrl;
@end

#pragma mark
@interface DBHelper (Reading)
@property(nonatomic,strong)JRFMDatabaseQueue* dbQue_Record;

//是否读完数据库操作
//添加读完的页码
- (void)readOver_updateListToTableClass:(NSString *)tableClassName dictArr:(NSArray*)dictList complete:(void (^)(void))comp;
//删除读完的页码
- (void)readOver_deletListToTableClass:(NSString *)tableClassName dictArr:(NSArray*)dictList complete:(void (^)(void))comp;
- (void)readOver_deletListToTableClass:(NSString *)tableClassName tbArr:(NSArray*)dictList complete:(void (^)(void))comp;
//查询读完的页码
- (void)readOver_getDictList:(void(^)(NSArray* list))retlist fromTableClass:(NSString*)tableClassName where:(NSString*)wheresql;
- (void)readOver_getList:(void(^)(NSArray* list))retlist fromTableClass:(NSString*)tableClassName where:(NSString*)wheresql;

@end
